﻿using Api.Application.Command.Leave;
using Api.Application.Command.Menu;
using Api.Application.Command.Role;
using Api.Application.Command.User;
using Api.Application.Command.UserRole;
using Api.DTO;
using AutoMapper;
using Domain;

namespace Api
{
    public class Mappers:Profile
    {
        public Mappers()
        {
            CreateMap<AddUserCommand,UserModel>().ReverseMap();
            CreateMap<UpdateUserCommand, UserModel>().ReverseMap();
            CreateMap<UserDTO, UserModel>().ReverseMap();
            CreateMap<ProvinceModel, ProvinceDTO>().ReverseMap();
            CreateMap<RegionModel, RegionDTO>().ReverseMap();
            CreateMap<CityModel, CityDTO>().ReverseMap();
            CreateMap<AddRoleCommand, RoleModel>().ReverseMap();
            CreateMap<RoleModel, RoleDTO>().ReverseMap();
            CreateMap<UpdateRoleCommand, RoleModel>().ReverseMap();
            CreateMap<UserRoleDTO, UserModel>().ReverseMap();
            CreateMap<AddMenuCommand, MenuModel>().ReverseMap();
            CreateMap<UpdateMenuCommand, MenuModel>().ReverseMap();
            CreateMap<TreeMenuDTO, MenuModel>().ReverseMap(); 
            CreateMap<RoleMenuDTO, RoleModel>().ReverseMap();
            CreateMap<DeionDTO, DeionModel>().ReverseMap();
            CreateMap<AddLeaveCommand, LeaveModel>().ReverseMap();
            CreateMap<UpdateLeaveCommand, LeaveModel>().ReverseMap();
        }
    }
}
